<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!-- styles here -->
    <link href="../../public/css/bootstrap.min.css" rel="stylesheet">
    <link href="../../public/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="../../public/css/animate.css" rel="stylesheet">
    <link href="../../public/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="../../public/css/style.min862f.css?v=4.1.0" rel="stylesheet">
</head>

<body>
    <div id="app" v-cloak>
        <div v-show="showList" class="fadeIn">
            <div class="col-sm-12">
                <table id="adminTable" data-mobile-responsive="true" data-icon-size="outline" data-search="true"></table>
                <div id="toolbar">

                    <a id="search" type="button" class="btn btn-primary" @click="update"><i class="glyphicon glyphicon-search" aria-hidden="true"></i>详情</a>
                    <a id="add-new" type="button" class="btn btn-primary" @click="add"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i>新增</a>
                    <a id="edit" type="button" class="btn btn-primary" @click="update"><i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>修改</a>
                    <a type="button" class="btn btn-primary" @click="del"><i class="glyphicon glyphicon-trash" aria-hidden="true"></i>删除</a>
                </div>
            </div>
        </div>
        <div v-show="!showList" class="wrapper wrapper-content animated fadeInRight panel panel-default" >
            <div class="panel-title">{{title}}</div>
            <form class="form-horizontal">
                <div class="form-group">
                    <div class="col-sm-2 control-label">用户名</div>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" v-model="admin.username"  placeholder="用户名"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">密码</div>
                    <div class="col-sm-4">
                        <input type="password" class="form-control" v-model="admin.password" placeholder="密码"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">APP编号</div>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" v-model="admin.appId"  placeholder="APP编号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">手机号</div>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" v-model="admin.phone" placeholder="手机号"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">角色</div>
                    <label class="radio-inline" v-for="item in roles">
                        <input type="radio" v-model="admin.roleId" name="roleId" :value="item.roleId"/> {{item.roleName}}
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">类型</div>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminType" name="adminType" value="1"/> <i></i>平台管理员
                    </label>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminType" name="adminType" value="2" /> <i></i>平台员工
                    </label>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminType" name="adminType" value="3"/> <i></i>OEM管理员
                    </label>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminType" name="adminType" value="4" /> <i></i>OEM员工
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">状态</div>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminStatus" name="status" value="1"/> 禁用
                    </label>
                    <label class="radio-inline">
                        <input type="radio" v-model="admin.adminStatus" name="status" value="0" /> 正常
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <input type="button" @click="saveOrUpdate" class="btn btn-primary" value="确定"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="cancel" value="返回"/>
                </div>
            </form>
        </div>
    </div>

    <!-- scripts here -->
    <script src="../../public/js/jquery.min.js?v=2.1.4" type="text/javascript"></script>
    <script src="../../public/js/bootstrap.min.js?v=3.3.6" type="text/javascript"></script>
    <script src="../../public/js/vue.min.js"></script>
    <script src="../../public/js/plugins/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
    <script src="../../public/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js" type="text/javascript"></script>
    <script src="../../public/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" type="text/javascript"></script>
    <script src="../../public/js/plugins/bootstrap-table/bootstrap-table-obj.js" type="text/javascript"></script>
    <script src="../js/admin.js" type="text/javascript"></script>
</body>

</html>